import tensorflow as tf

# 创建图

# 创建一个常量OP
m1 = tf.constant([[3, 3]])
# 创建一个常量OP
m2 = tf.constant([[2], [3]])

# 创建一个矩阵乘法OP， 把m1和m2传入
product = tf.matmul(m1, m2)
# print(product)


# 定义一个会话，启动默认图
# sess = tf.Session()
#
# result = sess.run(product)
# print(result)
#
# sess.close()

with tf.Session() as sess:
    result = sess.run(product)
    print(result)